home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Shareware Overload Trio 2
/
Shareware Overload Trio Volume 2 (Chestnut CD-ROM).ISO
/
dir36
/
tsbat46.zip
/
TSBAT.NWS
< prev
next >
Wrap
Text File
|
1994-09-04
|
39KB
|
709 lines
University of Vaasa, Finland, Sun SPARCstation IPX garbo.uwasa.fi
has a large collection of PD and shareware PC programs available by
anonymous ftp or mail server. The file /pc/ts/0news-ts contains news
about the TS-programs in the /pc/ts directory (in reverse order).
This text, which you now have, is an edited extract from the
0news-ts file (and old the feedback /pc/ts/fback028.zip file). (Also
see the tspost*.txt (* = 01,02,...) at garbo.uwasa.fi for additional
feedback and information.)
..................................................................
Prof. Timo Salmi Co-moderator of comp.archives.msdos.announce
Moderating at garbo.uwasa.fi anonymous FTP archives 128.214.87.1
Faculty of Accounting & Industrial Management; University of Vaasa
Internet: ts@uwasa.fi BBS +(358)-61-3170972; FIN-65101, Finland
...................................................................
Sun 4-Sep-94: I have a collection of useful batch files and batch
tricks, which I have updated. It is now garbo.uwasa.fi:/pc/pd2/
tsbat46.zip.
Added the following item to DOSTRICK.TXT
4) Stepping trough config.sys and autoexec.bat command by command.
5) Getting rid of "Insert diskette for drive B:"
6) Conditional deleting of files
7) Selected Doskey macro examples
Tue 31-May-94: I have updated my collection of useful batches and
batch tricks. It is now garbo.uwasa.fi:/pc/ts/tsbat45.zip.
- Added a list of user feedback to the TSBAT.INF file
- Added item 39) Getting the file basename
- Added optional batch enhancers:
BASENAME.EXE Extract file name from full name
BASEPATH.EXE Extract path name from full name
BASEXTEN.EXE Extract file extension from name
- Added
DOSTRICK.TXT Assorted MsDos tricks and tips
Sat 15-Jan-94: I have updated my collection of useful batches and
batch tricks. It is now garbo.uwasa.fi:/pc/ts/tsbat44.zip. Added the
following items to batricks.txt:
37) Traversing a directory tree
Added an related demonstration batch SWEEP.BAT.
38) Echoing the redirection symbol
Rewrote and added material to
24) Redirecting a batch file's output
30) How to obtain the MsDos version into an environment variable
Updated
PATH.TXT "How to beat the 127 byte limit"
SCANZ.BAT "Scan for viruses (incl. execomp)"
Sat 8-May-93: I have updated by collection of useful batches and
batch tricks to be garbo.uwasa.fi:/pc/ts/tsbat43.zip by adding the
following items to batricks.txt.
31) Finding out the number of regular files on a drive
32) Augmenting line numbers to a text file
33) Storing and returning to the original directory (push and pop)
34) Enticing the current date into an environment variable
35) Identifying the individual PC
36) For loop and redirection quirks
I have updated by adding a second method to
7) Convert a parameter to uppercase
Also a few minor updates to some of the batches.
Tue 2-Mar-93: I have updated by collection of useful batches and
batch tricks to be garbo.uwasa.fi:/pc/ts/tsbat42.zip by adding the
following items to batricks.txt.
26) A simple trick to "disable" a drive
27) Sending an escape sequence to the printer
28) Creating a random string
29) Finding out the length of a string
30) How to obtain the MsDos version into an environment variable
Added GFIND.BAT "Combine Garbo index files info". It is a
specialized batch for combining the information from Garbo MsDos FTP
archives file index files INDEX.ZIP, _dir.zip and _file.zip. GFIND
is also available in Unix format as garbo.uwasa.fi:/pc/ts/gfind
Sat 30-Jan-93: I have updated by collection of useful batches and
batch tricks.
Added
SUBS.BAT Make current dir a subst drive
Updated
BATRICKS.TXT Assorted batch tricks, plus added
24. Redirecting a batch file's output
25. Testing for environment space sufficiency
PROMPT.TXT Tips on prompt usages with ansi
Sat 19-Dec-92: Update garbo.uwasa.fi:/pc/ts/tsbat40.zip of my
collection of useful batch files and batch tips & tricks. Added
BDIR.BAT "Bare list & count of directories"
HEX.BAT "Add and subtract hexadecimal values"
PORTS.BAT "Display port base I/O addresses"
Updated and rewrote
BATRICKS.TXT "Assorted batch tricks"
Corrected
COLOR.BAT "Set screen color attributes"
It left on a tmp_ environment value. It shouldn't have.
Mon 26-Oct-92: I have again updated my collection of useful batch
files and batch tricks. It is now garbo.uwasa.fi:/pc/ts/tsbat39.zip.
Added COLORMAP.BAT "Ansi screen color esc. seq. map". I adapted
the idea from PC Computing October 1992. The difference in my
adaptation is that it displays the escape sequence codes you need to
induce the colors on the map. Furthermore, I do not use any
environment variables.
Added TOUCH.BAT "Touch a file's datetime stamp". It is quite
amazing the thing one can actually do with bare batch files using
the tricks trade. TOUCH.BAT is a good example of this.
Added EDIT.BAT "A truly trivial text editor". Appends text to a
text file from the con device, that is the keyboard.
Made some enhancements to BATRICKS.TXT "Assorted batch tricks"
and added the following item:
21) Testing if a file name includes a path
Sun 20-Sep-92: I have again updated my collection of useful batch
files and batch tricks. It is now garbo.uwasa.fi:/pc/ts/tsbat38.zip.
WEEKLY.BAT "Run program(s) once a week" is a new batch in my
collection. If you want to run a program once a week when you reboot
your computer, put
CALL WEEKLY Weekday YourApplicationName [Param1] [Param2] [...]
in your autoexec.bat file. Only one application, or one set of
applications, can be run on the same weekday with this batch. The
application can be a different one for each weekday.
Examples: CALL WEEKLY Mon YourApplication
CALL WEEKLY Tue echo Time to back up^G^G^G
CALL WEEKLY Fri call YourBatchOfManyPrograms
No auxiliary programs outside the normal MsDos commands have been
used in WEEKLY.BAT. Not easy, but it can be done.
DAILY.BAT "Run a program only once a day" which you call call
from your autoexec.bat relies on the MsDos external FC command. The
output of this command has been rewritten in MsDos 5.0. DAILY.BAT
did therefore not work for MsDos version 5.0. I have consequently
rewritten DAILY.BAT to comply also with the MsDos 5.0 version. A
similar amendment has been done to VIRUS.BAT "Another batch-based
virus test".
BOOT.BAT "Choose your boot configuration" now utilizes nu
NOBOOT.EXE from garbo.uwasa.fi:/pc/ts/tstsr12.zip (or whichever is
the current version number) if it is available. This is to prevent
the user from accidentally being too hasty about rebooting while the
batch is still running.
LASTBOOT.BAT "Show date + time of previous boot" streamlined to
show just the date and time without the confusion of referring to
the previous boot with "Current date is" which MsDos date (and time)
produce.
PROMPT.TXT "Tips on prompt usages with ansi" has some additional
information on key redefinitions.
BATRICKS.TXT added the following new items:
19. Utilizing the subst command in paths
20. How to run a batch once a week (testing for the weekday)
Some other, minor amendments.
Sun 30-Aug-1992: I have updated my collection of useful batch files
and batch tricks. It is now garbo.uwasa.fi:/pc/ts/tsbat37.zip.
BATRICKS.TXT "Assorted batch tricks" now also explains how to
extract the extension from a file name, how to prevent breaking a
batch, how to avoid auxiliary batches, and much more.
PUSHDIRE.BAT "Non-resident push directory" has been totally
rewritten and is now self-contained. The external auxiliary program
SETPUSHD.EXE is no longer needed, and has been omitted from the
collection. The companion program POPDIRE.BAT has been brought up to
date. Both the batches can take an /s (show) switch. See the remarks
within the batches for more information.
DELPATH.BAT "Delete a directory from the path" has been rewritten
so that it creates the auxiliary file that it needs as a temporary
file. Thus SETVAR.BAT is not longer needed in beforehand and has
been eliminated from the collection.
UNPACK.BAT "Unpack-test-view any archivetype" does not need, nor
allow an extension in the archive name because it know how to detect
the type of the archive. The batch now first checks that the user
has not mistakenly given an extension. UNPACK.BAT also treats the
other error situations in a more informative manner than before.
D.BAT "Directory with sort & wildsearch" uses implicit wildcards
to match anywhere in the file name(s). The batch now checks that the
users soes not enter explicit wildcards to D.BAT.
LOCATE.BAT "Wildcard file find". Added an optional /p paging
switch. Clarified the instructions.
WILD.BAT "Wilcard any command". Corrected the simple case of no
command given to wild.bat to jump out.
ARC2ZIP.BAT "Single .arc to .zip with comment" has been rewritten
to check more closely to correct input format. Likewise the renamed
ZOO2ZIP.BAT and EXE2ZIP.BAT. ARC2ZIP.BAT is now harddisk oriented
like the two others, since working on floppies can be now considered
rare.
Some other minor changes and rewrites of the batches and their
documentation. (The batches are self-documenting.)
Thu 6-Aug-92: I have updated my collection of useful batch files and
batch tricks. It is now garbo.uwasa.fi:/pc/ts/tsbat36.zip. Among the
updates and enhancements are
C.BAT "Lazy changing of a directory" has been enhanced. The basic
idea is that if you are tired of typing the backslash (\), C.BAT
lets you use an easier syntax. For example if you have a directory
on the current drive called \text\jokes\stupid you can apply the
form "c text jokes stupid" without needing the backslash. If you
type c alone, it takes you to the root directory. Now C.BAT can
handle drives too, and at one go at that. For example of you are on
the C: drive and your directory is on D: you can apply
c d: text jokes stupid
The beauty of the system is that the "d:" is optional, that is the
batch can identify whether the first parameter indicates a drive or
not.
BATRICKS.BAT is a new addition. It covers assorted batch tricks
from the batches in the TSBAT collection, and also a number
additional tricks that are not covered in the in the actual batches.
BOOT.BAT "Choose your boot configuration" now sounds a warning
bell if you choose an non-existing boot configuration. My own
selection new has four alternative boots, but you can easily adjust
to yours. To logic is rather straight-forward. Also a couple of
typos in the rem comments have been corrected.
PROMPT.TXT "Tips on prompt usages with ansi" has some new
clarifications.
SCANZ.BAT "Scan for viruses (incl. execomp)" has been brought up
to date.
VAASA.INF "Info: Finland, Vaasa, U of Vaasa, our faculty, Timo"
has been updated. This file is included in most of my program
packages.
There are several minor adjustments in some of the other items.
Tue 14-Apr-92: I have updated my collection of useful batch files
and tricks making it garbo.uwasa.fi:/pc/ts/tsbat35.zip.
Sometimes there are situations where a batch file needs to call
another in order to perform its task. There is a genuinely clever
trick in Wolverton & Gooking, Supercharging MsDos, Microsoft Press,
1991, p. 102 to circumvent the need of having a separate batch by
making a batch call itself. I have modified the solution a bit and
rewritten my SAFEDEL.BAT (safe delete of files) so that it no longer
needs the auxiliary SAFEDEL1.BAT batch.
Likewise the SHOW.BAT (wildcard multi-file type command) has been
updated and the auxiliary file SHOW1.BAT has been deleted.
The same book shows how to push the current directory without the
need of resident programs, auxiliary executables, or environment
variables. On the other hand this is less general than my
PUSHDIRE.BAT which uses an auxiliary executable and environment
variables. PUSHIT.BAT based on the idea from Wolverton & Gooking
does not work between different drives. I have added this file to
tsbat35.zip along with its auxiliary text file CD.AUX.
Sat 21-Mar-92: I have updated my collection of useful batch files
and tricks making it garbo.uwasa.fi:/pc/ts/tsbat34.zip.
- Added EXE2ZIP for converting self-extracting archives into
zipped archives. Requires that you have PKZIP.EXE and dive R:
available. I have ramdisk on drive R:, and if you do not you have
to either customize the batch or use a suitable drive
substitution like SUBST R: C:\
- Updated REZIP.BAT which removes authenticity -AV labels for
zipped archives. (Such a batch is useful, since PKWare's
authenticity code was broken and some BBSes put in their own -AV
labels). If errors are reported by pkzip, the user is asked for
whether s/he wants to go on nevertheless.
- Added a WILD.BAT to perform wildcarded operations with commands
which ordinarily do not allow wildcards. Example of WILD.BAT
usage: WILD *.txt type. The idea for my own version comes a from
a note in a Finnish computer journal (Mikro PC, March 1992, Aimo
Matikainen).
Sat 22-Feb-92: I have updated my collection of useful batch files
and tricks making it garbo.uwasa.fi:/pc/ts/tsbat33.zip.
- Added PROMPT.TXT tips on prompt usages with ansi
- Added REPLY.BAT to demonstrate how batch files can after all
accept input without any auxiliary programs (like the common
ask.exe). This is not a widely known trick, although I cannot
claim true originality. It utilizes environment variables, and is
somewhat awkward, but shows that it can be done.
Tue 4-Feb-92: I have again updated my collection of useful batch
files. It is now garbo.uwasa.fi:/pc/ts/tsbat32.zip. Some of the
batches do not allow wildcards in file names given to them as
parameters. There was a clever for-loop trick in the PC Magazine Vol
11 No 1 on page 364 to check whether the file name is wildcarded.
Even if innovative the PC Magazine's solution uses unnecessarily an
environment variable for the checking. But the article got me
thinking that I should find a better solution and put in a check for
wildcards to warn the user in those of my batches which do not allow
wildcards. Consequently I have updated the following batches in my
collection:
ARC2ZIP.BAT Single .arc to .zip with comment
REZIP.BAT Remove zip authenticity labels
UNPACK.BAT Unpack-test-view any archivetype
ZOO2ZIPH.BAT Single .zoo to .zip on harddisk
Sat 25-Jan-92: I have updated my collection of useful batch files.
It is now garbo.uwasa.fi:/pc/ts/tsbat31.zip and contains 49 batch
files. It adds
- boot.bat for convenient selective booting from alternative
configurations. It is often believed that complicated programs are
needed for booting with alternative configurations. The boot.bat
batch shows that this need not be the case at all.
- path.txt to explain how to easily circumvent the 127 character
limit on the path length.
- showtime.bat to show both the date and the time without the hassle
of beating enter to death.
- mve.bat to move file(s) to another directory.
Sat 7-Dec-91: I have updated my collection of useful batch files. It
is now garbo.uwasa.fi:/pc/ts/tsbat30.zip.
Alan Clark (clark@odie.ee.wits.ac.za) suggested that the screen
blanking batches could well do with a method to totally hide the
cursor while blanked. I have looked into this and noticed that this
can be easily achieved without extra programs by using ansi escape
sequences. BLK.BAT shows how to do it. (You'll have to activate
cursor hiding by editing three rems away).
Added LC.BAT line count for text files.
Added TEST33.BAT Test for MsDos 3.3 or later, batch demo
Sat 9-Nov-91: I have updated my collection of useful batch files to
be garbo.uwasa.fi:/pc/ts/tsbat29.arc. It includes PUSHDIRE.BAT,
SETPUSHD.EXE, and POPDIRE.BAT for pushing and popping the current
directory (utilizing environment variables). I have added a /q
switch for quiet operation (no echoing of the environment variables)
at a suggestion from Doug Tooley, djtooley@lotus.uwaterloo.ca.
I have added a TESTANSI.BAT batch (with accompanying ISANSI.EXE)
which can be used to test whether any ansi-type screen driver is
installed and thus available.
There are also some minor adjustments in a couple of the old
batches.
Get this package even if you do not need the individual batches.
There is much to learn from them about MsDos and batch usages. Many
Frequently Asked Questions (FAQs) are implicitly answered by looking
at these files.
Sun 20-Oct-91: I have a collection of useful batch files which I
have updated to be garbo.uwasa.fi:/pc/ts/tsbat28.arc.
I have added a LEVEL.BAT testbench batch for testing the error
level returned by programs.
I have updated the ASK.EXE batch file enhancer. It now has the
option to of returning with a timeout errorlevel. The usage of
this enhancer is:
ASK [Prompt] [/b] [/d] [/l] [/t##] [/u]
! ! ! ! +- convert to Upper case
! ! ! +- Time-out parameter (0 = forever)
! ! +- convert to Lower case
! +- Direct read (no <-+ needed)
+- Batch mode (needed only if no prompt)
I have added an ASKENV.EXE batch file enhancer to the collection.
It is similar to ASK.EXE, but instead of returning an errorlevel
value, it sets the (parent's) environment variable ASKENV value
equal to the user's response.
Mon 9-Sep-91: I have updated my collection of useful batch files. It
is now /pc/ts/tsbat27.arc.
Four of the batches in the package has been updated. Of these
DAILY.BAT for running a program no more than one a day (eg from
autoexec.bat) utilized ENTER.TXT to simulate pressing the enter key.
This is no longer necessary but has been rewritten (with a trick
with the echo command) in a way that no longer needs this separate
file. My thanks to Ran Cheremsh CHERMESH%BGUVM.BITNET for reporting
the problem.
SCANZ for scanning .ZIP files for viruses had a bug in the
routine for scanning embedded .ZIPs.
Tue 9-Jul-91: I have updated my collection of useful batch files. It
is now /pc/ts/tsbat26.arc.
Note that even if you don't perhaps need the same batches as I
do, these batches may teach you many useful batch programming
tricks which I have accumulated during my PC years.
Made a number of minor stylistic corrections.
Since someone cracked the pkzip 1.10 authenticity (-av) code some
BBSes have been putting in their own ads as the authenticity labels.
A new batch rezip.bat removes these labels, which may give the users
a false sense of security.
Added a simple batch ruler.bat which shows the screen columns
using ansi codes to avoid excessive scrolling.
I have my ramdisk on currently on drive R on my PCs which I use
at home and at office. For whatever it is worth I have updated the
batches to reflect this change. Some of the batches require anyway
that you edit the paths in them to reflect yours, so no added
problem arise because of this. And, if you have your own ramdisk,
say, on d:, you can put the statement subst r: d:\ eg in your
autoexec.bat file to avoid the need of editing just because we may
happen to have ramdisks on different drives. (To be accurate there
is no absolute need of your d: physically being a ramdisk. But it
makes things a bit faster.)
Sun 12-May-91: I have updated my collection of useful batch files to
be /pc/ts/tsbat25.arc.
One of the constant worries of downloaders of archived packages
is the threat of viruses. (Games from shady BBSes are particularly
susceptible, but even commercial products have been known to be
infected). Fortunately there are good virus checkers like McAfee's
/pc/virus/scanv77.zip and Fridrik Skulason's /pc/virus/fp-115a.zip
available to check for infections. There are, however, two dilemmas
in checking archived packages on a routine basis. (Since the format
garbo.uwasa.fi archives mostly uses is .zip let's speak of zipped
files). The first problem is that there are so many executable
compressors in use currently (such as lzexe, pklite, diet, tinyprog,
etc). This means that unless the virus checking programs can observe
all these variations, a virus can be hiding in an execompressed
form. Therefore it is advisable to expand the executables for the
check. A second problem is that .zip files occasionally contain
embedded .zip files (eg PC-Magazine's collections often do). These
embedded .zip files must be unzipped for a closer examination.
The earlier versions of the tsbat collection included a batch
called scanzip.bat. I have completely rewritten this batch to take
care of the two eventualities discussed above. I have renamed the
rewritten batch scanz.bat. Note that before using this new batch,
you have to go through scanz.bat and edit all the directory path
references to correspond to your own configuration. This is, of
course, an inconvenience, but it is the best way of guaranteeing
that a batch complicated as this stays reasonably efficient.
Wed 13-Mar-91: I have written a menu based ansi.sys driven advanced
batch for sending command codes to the printer to make printer
initialization and setting easy. It is called setprn.bat. It is for
Diconix Inkjet Parallel Printer Model 150, which is an Espon
compatible printer. Thus the batch is suitable for various different
printer makes, and easily configurable. I have added this batch to
my collection of (hopefully) useful and instructive batch files
/pc/ts/tsbat24.arc best available by anonymous ftp from
garbo.uwasa.fi archives. There is a program-based alternative to
setprn.bat, that is setdico.exe which can be found in
/pc/ts/tsprn##.arc. The difference is that in setprn.bat you are
able to configure the printer codes if you wish.
Sat 29-Dec-90: I have programmed a fair number of MsDos batch files
to make up a batch file collection of hopefully both useful and
instructive batches. I have updated the collection to be version
/pc/ts/tsbat23.arc by adding some new batches.
...
FU.BAT is a poor man's function evaluator utilizing gwbasic that
(usually) belongs automatically to the MsDos delivery. The basic
idea (pardon the pun) of combining batch and gwbasic programming is
not really mine. I got it from the PC-Magazine. The code of this
batch, however, is entirely due to yours truly.
...
ASK.EXE is a common batch file enhancer returning as errorlevel
the ascii value of the first character of the user's response.
An example of a simple batch utilizing ASK:
echo off
ASK Yes or no? /d /u
if errorlevel==89 if not errorlevel==90 echo It was a yes
if errorlevel==78 if not errorlevel==79 echo It was a no
echo on
My ask has switches for lower case (/l) and upper case (/u)
conversions, and (/d) "direct" reads without needing to press the
enter key. The ask prompt may include escape sequences for ansi
graphics. This is a feature not always available in other ask
programs.
Ok, there are countless ask batch enhancers already around, so
why yet another. Simply so that then tsbat23.arc has it, and you
don't have to get one separately. Furthermore, this ask is both
simple and general enough to be easy to use while being still
flexible.
BTW, ask is the one command which the original MsDos batch
programming most conspicuously lacks and needs. So many other
seemingly lacking features are embedded in MsDos, and you just have
to ferret them out. That's partly what tsbat23.arc collection is
about.
...
SAFEDEL.BAT is a generalized batch for deleting files. It asks
for confirmation for each file to be deleted. The usage is
SAFEDEL [FileName1] [FileNam2] ...
and wildcards are allowed.
...
MENU.BAT show show to build menus for easy program selection by
the user. This batch utilizes ask.exe, and is livened up by ansi
graphics.
...
UNPACK.BAT has been updated. It extracts, tests, and views packed
files (archives) irrespective of the packing method. The update
handles also .arj files (the new arrival sent packing on the scene).
Mon 22-Oct-90: I have updated my batch file collection to be
/pc/ts/tsbat22.arc. PC-Magazine Vol 9 Num 14 published a batch to
com file compiler bat2exec.com by Douglas Boling which is in the
/pc/pd2/bat2ex13.zip package at chyde.uwasa.fi archives. As would be
expected a batch compiler is more stringent in its requirements than
MsDos. Consequently I have gone through the batches in my collection
and seen to it that they are compilable. Note that in doing this I
have not altered the tasks of the batch files, nor have I included
the resultant compiled .com files. Where needed, I have just
adjusted the batches to conform with bat2exec.com compiler
requirements.
Among others there is an addpath.bat batch for adding directories
to the path without needing to rewrite the whole path as the
ordinary path command would require. In a similar manner there is
delpath.bat to omit a single directory from the path. Delpath.bat
needs an auxiliary batch file called setvar.bat, which must be
available to the delpath.bat. Delpath now checks whether the
auxiliary setvar.bat file is available in the current directory or
at path before running the rest of delpath.bat.
When a batch contains a call to a program, the program must
either be in the current directory, at path, or the call must
contain the path to the program. The last method has the
disadvantage of requiring adaptation to user's own structure.
Therefore the most general method is having the necessary program(s)
at path. If the program is not available, a normal batch ends in a
"Bad command or file name" error message. This gives very little
information of the cause of the problem. Therefore I have added
routines in the batches to precheck that the required program(s) are
indeed at path, and if not, issue a proper error message telling
what exactly is awry. (The batch trick here is testing whether a
given file is at path.)
An additional note. Batches like delpath.bat cannot obviously be
compiled successfully with bat2exec because of its need of an
auxiliary batch. Another batch that works as a normal batch file,
but won't work when compiled is color.bat. Color.bat sets the screen
color attributes using ansi code. Bat2exec.exe compiler has similar
problems with some other batches as well, but this does not affect
the user of these batch files in any way.
I have added blk.bat as an alternative simple screen saver to
complement blank.bat. Blk.bat stores the screen before blanking and
pops it when you exit the saver.
Fri 13-Jul-90: One of the operators at our computer centre asked me
today whether I know a replacement utility for MsDos diskcopy to
copy a 1.2Mb floppy to another without having to change the disks
more than once. This is because MsDos diskcopy.com requires a total
of five disk changes in the process, and besides this being tedious
one easily gets things mixed up. If you look at things this way,
scopy.bat in /pc/ts/tsbat21.arc does exactly what he was asking for,
in a single step. But on the balance, you must have the target disk
formatted before you begin the process (diskcopy does that for you,
if necessary). This batch method works easily, though, only if the
diskette to be copied has no subdirectories.
Sun 24-Jun-90: I have updated my batch file collection to be
(/pc/ts)/tsbat21.arc. This time I have added my rendition of setting
the screen text color and background. The color.bat batch uses ansi
color codes. (Thus you must have loaded ansi.sys driver, or its
enhanced equivalent (such as nansi.sys or zansi.sys). In other words
your config.sys must have a line like device=\sys\zansi.sys in it).
Version tsbat20 introduced a scanzip.bat batch as a shell to scan
.zip packages for viruses utilizing McAfee's scan.exe virus checker.
In addition to unzipping the .zip files into a temporary directory
the batch uncompressed lzexec .exe files, if any, using Alan
Posner's (/pc/pd2) isl12.zip and Mitugu Kuriziono's
(/pc/pd2/)unlzexe5.zip. With the introduction of version
(/pc/virus/)scanv63.zip uncompression lzexed executables is no
longer necessary, and I have adjusted the batch accordingly. I have,
however, done this by just commenting away parts of the batch, so
that you can still apply it if you have earlier than scan.exe
version 63. I have also added checking overlay files in addition to
.exe and .com files.
Please note that your email comments, feedback and suggestions on
the ts-programs would be welcome. And if you want to look at other
users' feedback, you can see it by getting /pc/pd2/post##.txt (## =
01, 02, and so on).
Thu 7-Jun-90: Lzexed files pose a problem for the present virus
scanners. While waiting to see the announced scanv63 to appear with
abilities to scan lzexe-compressed files, I wrote a batch to handle
scanning .zip packages. This batch checks both ordinary and lzexed
files within a .zip package. The following shareware and PD programs
are needed: pkunzip.exe, scan.exe, islzexe.exe, unlzexe.exe, The
packages containing these programs can be found from good BBSes and
eg from chyde.uwasa.fi by anonymous ftp. The new batch scanzip.bat
is included in the updated /pc/ts/tsbat20.arc batch file collection.
Fri 1-Jun-90: Released version /pc/ts/tsbat19.arc of my batch files
collection. It includes two new batches. There is a poor man's
screen save blank.bat, and there is an extension of the MsDos type
command show.bat, which allows the usage of wildcards and multiple
file names. You'll decide yourself if there is any usage for a
wildcard type. Myself, I do not see any outright, but the batch
itself is a very good exercise in batch programming. If you are new
to this aspect of MsDos, I think you will learn many useful tricks
from batches like this. - Where possible, I have tried to write the
batches in a way that they need a minimum about of auxiliary files
or such auxiliary programs, which are not part of MsDos (internal or
external) commands. - I have rewritten lastboot.bat (recording the
previous boot time of your PC) and logrun.bat (recording program
usage) so that they no longer need the auxiliary files enter.txt and
star.txt, which have been deleted from the new version. - There are
some stylistic changes in scopy.bat.
Sat 17-Mar-90: Released a new version /pc/ts/tsbat18.arc of my batch
files collection. - It seems that this batch collection has become
perhaps the most popular of my packages judging from the recent
download figures and the comments from users. (A note written later:
The most downloaded package of mine is the Frequently Asked
Questions /pc/ts/tsfaq##.arc, by a broad margin). - Corrected a
small bug in c.bat that prevented going back to the root directory.
- Built a simple batch lastboot.bat for displaying the date and time
of the previous booting. - Also built a new batch virus.bat. This
batch makes a directory both prior and after running the suspect
program, and gives a warning if the directories differ, and prepares
a list of the differences. The batch can be also used by a
knowledgeable user for the more benevolent similar purpose of
checking what files a certain programs changes.
*Flame off* One lesson to be learned from batch programming is
that properly used MsDos can be quite flexible. I think it is here
to stay for a long time yet Unix and OS/2 notwithstanding. And this
does not mean castigating Unix nor OS/2. (Any discussion of this
aspect to the proper newsgroups, if you please.) *Flame on* :-)
Sun 11-Mar-90: Released a new version /pc/ts/tsbat17.arc of my batch
files collection. This update introduces a batch shell unpack.bat
for extracting, testing, and viewing packed files irrespective of
the packing method.
Sun 04-Mar-90: My batch file collection is now version (/pc/ts/)
tsbat16.arc. - Addpath.bat appending new directories to the path now
checks whether the directory exists, and whether the directory
already is at path, thus preventing mistakes by the user. I use this
batch myself a lot, and since I often make typing errors, I wanted
the batch to do the validity checking for me. - Arc2zip.bat
converting an .arc file to a .zip file, with comment, has added
safeguards against errors and corrupted archives. - Deldir.bat for
deleting the files from a directory and then removing the directory,
has been rewritten. - There are also new batches in the collection.
- There is a harddisk version of the packing methods converter
called zoo2arch.bat. It is a .zoo to .zip converter eg for those who
prefer tighter .zip files over the binary posting's current .zoo
packing method. - If you have been annoyed by the fact that MsDos
cannot take more than one command per command line, m.bat is the
batch for you. It is a batch that facilitates giving multiple MsDos
commands. Another new batch is d.bat. It gives the directory with
sort and generalized name matching. - Also managed to resist the
temptation to rename the documentation to the obvious bat.man.
Thu 25-Jan-90: I have updated my batch file collection to be version
(/pc/ts/)tsbat15.arc. There is just one addition, daily.bat. It is
intended to run a program from the autoexec.bat file only once in a
day. There are programs in circulation, which achieve the same
thing as daily.bat. The trick in daily.bat is that it is a true
batch file without the need of any external user-made programs.
This not a very difficult to do, but tricky enough to be
interesting and educational.
Tue 16-Jan-90: I have still been thinking about batch files and
interesting tricks to do with them, and I therefore publish a new
upgrade of my botch :-) collection in a rapid succession after the
last update. The upgrade is (/pc/ts/)tsbat14.arc, and it will be
available by anonymous ftp at least from chyde.uwasa.fi, Simtel20,
and by BBS download or file request from Micro Maniacs Opus 2:515/1
telephone 358-0-425966. Two new utilities are included. The first is
delpath.bat, which removes a directory from the path variable. This
was a really tricky one, and my solution (contrary to the other
batches in the collection) requires MsDos version 3.30 because it
uses the call command. I have since seen another solution in the
PC-Magazine (Vol 8 No 21) but mine uses a somewhat different
technique, and should be clearer because even I can understand how
mine works :-). The second new batch is deldir.bat for deleting the
files from a directory and then removing the directory. This is
really trivial, but I needed it myself. I have tried to include
reasonable number of safeguards within this batch.
Sun 14-Jan-90: I have updated my batch file collection to be version
(/pc/ts/)tsbat13.arc.
There is a new batch arc2zip.bat for converting an .arc file to a
corresponding .zip file. The batch automatically adds your zip-file
comment to the converted .zip. Also, the date of the zip file is
automatically set to the date of the latest file within the .zip,
not the date of the conversion.
Another new batch is zipdate. It demonstrates how to datestamp
.zip packages.
The new version also includes a second addpath utility. It is
apath-om.bat and is by Otto Makela. It is included in my batch file
collection with Otto's explicit permission. Thanks Otto. This batch
nicely demonstrates testing a condition (is a directory already in
the path) in MsDos batch programming. I had an interesting time
testing Otto's batch and discussing the dilemmas in the earlier
versions after Otto posted the original version in the news in
alt.msdos.programmer. I think that we both gained in the process. I
would pleased to consider similar useful contributions from other
users, as well. If you are interested, contact me by email.
Where.bat has been rewritten. It finds a file by using a search
string on the file name. Contrary to the ordinary wildcarded MsDos
DIR-type convention, where.bat matches the search string anywhere
within the body of the file name. The updated where.bat has been
made case-insensitive (applies upper case conversion on batch
parameters).
Some of the other batches in the package have had their help
texts extended.
Sat 18-Nov-89: There are several nice memory resident push/pop
directory utilities around. As you know pushdir stores the name of
the directory where you are. You can then change the directory (and
the drive) as much as you like, and popdir takes you right back to
the original directory. But memory resident programs tend to pile
up, and I started thinking whether push/pop can be achieved using
non-resident batch methods. PUSHDIRE.BAT and POPDIRE.BAT together
with SETPUSHD.EXE do this by juggling the environment variables. I
pushed these files in my batch file collection and updated it to be
tsbat12.arc. You can pop them from there.
Tue 31-Oct-89: Released update /pc/ts/tsbat11.arc of my batch files
collection. The new release introduces LOGRUN.BAT. It can be used
for calling programs and logging the call in a usage log with
time/date information. The batch utilizes MsDos time and date
commands for making the usage log of the program calls. The bug
caused by the non-standard switch /i in the file finder WHERE.BAT
has been amended. A new batch LOCATE.BAT for locating a file (or
files) on a disk has been added. Contrary to WHERE.BAT it is not
case sensitive. The "change the directory" batch has been renamed
C.BAT (was SD.BAT). I have also added more comments within some of
the batches.
If you get an "Out of environment space" message in these, or any
other batches, try increasing your environment space by using shell
configuration in config.sys:
Example: shell=c:\bin\command.com c:\bin /e:1024 /p
Sun 29-Oct-89: I decided to introduce a batch file collection
/pc/ts/tsbat10.arc. The batches are quite straightforward, and do
not need any special auxiliary programs, just the ordinary MsDos
commands. Some of the batches are from my other utility packages,
some are new. I do not claim a high degree of originality. This is
because the methods and tasks of batch programming keep repeating
over and over again. But I hope that you will find some of my
tricks useful.
And if you feel that you have useful batches yourself, which you
would like to distribute to your fellow users, I would be interested
in considering any good ideas for development. Due credit would
naturally be given. I would, however, reserve the right to choose,
and to develop your batches to suit the future versions of this
Public Domain collection.
Thu 26-Oct-89: I have a private mailing list for emailing these
update news. Especially, if you have my programs downloadable at
your site or your BBS you are welcome to ask for inclusion on this
list by emailing to me at ts@chyde.uwasa.fi.